package com.ungao.framework.mapping;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

/**
 * orm配置信息类
 */
public class Configuration {

    /**
     * 数据库连接池信息
     * mybatis-config.xml
     */
    private Environment environment;

    /**
     * Mapper扫描相关类
     */
    private final Set<Class> mapperClasses = new HashSet<>();

    /**
     * 接口对象存储信息
     * mapper.xml
     * key: com.package.method
     * value: sql
     */
    private Map<String, MapperStatement> mapperStatements = new ConcurrentHashMap<>();

    public Environment getEnvironment() {
        return environment;
    }

    public void setEnvironment(Environment environment) {
        this.environment = environment;
    }

    public Map<String, MapperStatement> getMapperStatements() {
        return mapperStatements;
    }

    public void setMapperStatements(Map<String, MapperStatement> mapperStatements) {
        this.mapperStatements = mapperStatements;
    }

    public Set<Class> getMapperClasses() {
        return mapperClasses;
    }
}
